package com.hy.mydesktop.shared.business;

import java.util.HashMap ;
import java.util.Map ;

import com.extjs.gxt.ui.client.data.BaseModel ;
import com.hy.mydesktop.shared.rpc.meta.GxtToSeamServiceParameter;

public class  FormPanelHandler
{

	public static void configureFormPanel(Map < String , Object > map ,String serviceName,String queryMethodName)
	{
		BaseModel gxtToSeamServiceParameter = new BaseModel();
		gxtToSeamServiceParameter.set("serviceComponentName", "presentationDatalearningAndSeamServicesInvoker");
		gxtToSeamServiceParameter.set("serviceMethodName","parseAndInvoke");
		BaseModel[] methodArguments2 = new BaseModel[1];
		methodArguments2[0] = new BaseModel();
		
		
			
		gxtToSeamServiceParameter.set("methodArguments",methodArguments2 );
		
			map.put("gxttoseamserviceparametermodel", gxtToSeamServiceParameter);

			
		BaseModel gxtToSeamServiceParameter2 = new BaseModel();
		gxtToSeamServiceParameter2.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter2.set("serviceMethodName", queryMethodName);
		BaseModel[] methodArguments3 = new BaseModel[1];
		methodArguments3[0] = new BaseModel();
		gxtToSeamServiceParameter2.set("methodArguments",methodArguments3 );
		map.put("gxttoseamserviceparametermodelforquery", gxtToSeamServiceParameter2);
		
		/**
		 * 查询方法
		 */
		/*BaseModel gxtToSeamServiceParameter = new BaseModel();
		gxtToSeamServiceParameter.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter.set("serviceMethodName",selectMethodName);
		BaseModel[] methodArguments2 = new BaseModel[1];
		methodArguments2[0] = new BaseModel();
		gxtToSeamServiceParameter.set("methodArguments",methodArguments2 );
		map.put("gxttoseamserviceparametermodel", gxtToSeamServiceParameter);
		map.put("dataload", gxtToSeamServiceParameter);

		*//**
		 * 插入方法
		 *//*
		BaseModel gxtToSeamServiceParameter2 = new BaseModel();
		gxtToSeamServiceParameter2.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter2.set("serviceMethodName", addMethodName);
		BaseModel[] methodArguments3 = new BaseModel[1];
		methodArguments3[0] = new BaseModel();
		gxtToSeamServiceParameter2.set("methodArguments",methodArguments3 );
		map.put("gxttoseamserviceparameterforadd", gxtToSeamServiceParameter2);
		map.put("dataload", gxtToSeamServiceParameter2);

		*//**
		 * 修改方法
		 *//*
		BaseModel gxtToSeamServiceParameter3 = new BaseModel();
		gxtToSeamServiceParameter3.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter3.set("serviceMethodName", updateMethodName);
		BaseModel[] methodArguments4 = new BaseModel[1];
		methodArguments4[0] = new BaseModel();
		gxtToSeamServiceParameter3.set("methodArguments",methodArguments4 );
		map.put("gxttoseamserviceparameterforupdate", gxtToSeamServiceParameter3);
		map.put("dataload", gxtToSeamServiceParameter3);

		*//**
		 * 合并方法
		 *//*
		BaseModel gxtToSeamServiceParameter4 = new BaseModel();
		gxtToSeamServiceParameter4.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter4.set("serviceMethodName", mergeMethodName);
		BaseModel[] methodArguments5 = new BaseModel[1];
		methodArguments5[0] = new BaseModel();
		gxtToSeamServiceParameter4.set("methodArguments",methodArguments5 );
		map.put("gxttoseamserviceparametermodelformerge", gxtToSeamServiceParameter4);
		map.put("dataload", gxtToSeamServiceParameter4);*/
		
	}
	
	
	
	public static void configureFormPanel(Map < String , Object > map )
	{
		BaseModel gxtToSeamServiceParameter = new BaseModel();
		gxtToSeamServiceParameter.set("serviceComponentName", "presentationDatalearningAndSeamServicesInvoker");
		gxtToSeamServiceParameter.set("serviceMethodName","parseAndInvoke");
		BaseModel[] methodArguments2 = new BaseModel[1];
		methodArguments2[0] = new BaseModel();
		
		
			
		gxtToSeamServiceParameter.set("methodArguments",methodArguments2 );
		
			map.put("gxttoseamserviceparametermodel", gxtToSeamServiceParameter);

			
		
		
		/**
		 * 查询方法
		 */
		/*BaseModel gxtToSeamServiceParameter = new BaseModel();
		gxtToSeamServiceParameter.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter.set("serviceMethodName",selectMethodName);
		BaseModel[] methodArguments2 = new BaseModel[1];
		methodArguments2[0] = new BaseModel();
		gxtToSeamServiceParameter.set("methodArguments",methodArguments2 );
		map.put("gxttoseamserviceparametermodel", gxtToSeamServiceParameter);
		map.put("dataload", gxtToSeamServiceParameter);

		*//**
		 * 插入方法
		 *//*
		BaseModel gxtToSeamServiceParameter2 = new BaseModel();
		gxtToSeamServiceParameter2.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter2.set("serviceMethodName", addMethodName);
		BaseModel[] methodArguments3 = new BaseModel[1];
		methodArguments3[0] = new BaseModel();
		gxtToSeamServiceParameter2.set("methodArguments",methodArguments3 );
		map.put("gxttoseamserviceparameterforadd", gxtToSeamServiceParameter2);
		map.put("dataload", gxtToSeamServiceParameter2);

		*//**
		 * 修改方法
		 *//*
		BaseModel gxtToSeamServiceParameter3 = new BaseModel();
		gxtToSeamServiceParameter3.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter3.set("serviceMethodName", updateMethodName);
		BaseModel[] methodArguments4 = new BaseModel[1];
		methodArguments4[0] = new BaseModel();
		gxtToSeamServiceParameter3.set("methodArguments",methodArguments4 );
		map.put("gxttoseamserviceparameterforupdate", gxtToSeamServiceParameter3);
		map.put("dataload", gxtToSeamServiceParameter3);

		*//**
		 * 合并方法
		 *//*
		BaseModel gxtToSeamServiceParameter4 = new BaseModel();
		gxtToSeamServiceParameter4.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter4.set("serviceMethodName", mergeMethodName);
		BaseModel[] methodArguments5 = new BaseModel[1];
		methodArguments5[0] = new BaseModel();
		gxtToSeamServiceParameter4.set("methodArguments",methodArguments5 );
		map.put("gxttoseamserviceparametermodelformerge", gxtToSeamServiceParameter4);
		map.put("dataload", gxtToSeamServiceParameter4);*/
		
	}
	
	
	
	public static void data(Map < String , Object > map,String serviceName,String selectMethodName )
	{
		
		/**
		 * 查询方法
		 */
		BaseModel gxtToSeamServiceParameter = new BaseModel();
		gxtToSeamServiceParameter.set("serviceComponentName", serviceName);
		gxtToSeamServiceParameter.set("serviceMethodName",selectMethodName);
		BaseModel[] methodArguments2 = new BaseModel[1];
		methodArguments2[0] = new BaseModel();
		gxtToSeamServiceParameter.set("methodArguments",methodArguments2 );
		map.put("gxttoseamserviceparametermodel", gxtToSeamServiceParameter);
		map.put("dataload", gxtToSeamServiceParameter);

	}
}
